True if this sound is currently playing.
sound_playing(s) -> bool| Name | Type |
|---|---|
s | sound |
bool
True if this sound is currently playing. Mostly useful to avoid re-triggering a long effect that is already running (a charge-up loop that should only start once, not restart on every frame the trigger is held).
if (!sound_playing(snd_doc_beep)) {
sound_play(snd_doc_beep, 1);
}Starts the sound only if it is not already playing - safe to call every frame without ever restarting or overlapping it with itself.